package com.talkweb.newproject.admin.loginlog.service;

import com.talkweb.newproject.admin.loginlog.dao.LoginlogDao;
import com.talkweb.newproject.admin.loginlog.dto.LoginlogEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by qsf on 2019/4/18.
 */
@Service("loginlogService")
public class LoginlogService {
    @Autowired
    private LoginlogDao loginlogDao;

    /**
     * 保存日志
     * @param loginlog
     * @throws Exception
     */
    public void save(LoginlogEntity loginlog) throws Exception{
        loginlogDao.save(loginlog);
    };

    /**
     * 根据id查询日志
     */
    public LoginlogEntity queryObject(Integer id) throws Exception {
        return loginlogDao.queryObject(id);
    }

    /**
     * 回滚数据库表?
     */
    public void rollbackTables () throws Exception{
        loginlogDao.rollbackTables();
    }
}
